Control array
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
In Visual Basic, a control arraycite-ref-0-1-0[1] is a group of related controls in a Visual Basic form that share the same event handlers. Control arrays are always single-dimensional arrays, and controls can be added or deleted from control arrays at runtime. One application of control arrays is to hold menu items, as the shared event handler can be used for code common to all the menu items in the control array.cite-ref-2[2]
Control arrays are a convenient way to handle groups of controls that perform a similar function. All the events available to the single control are still available to the array of controls, the only difference being an argument indicating the index of the selected array element is passed to the event. Hence, instead of writing individual procedures for each control (i.e. not using control arrays), you only have to write one procedure for each array.
References
cite-note-0-11. ↑ "Developer tools, technical documentation and coding examples".
cite-note-22. ↑ "vb control array - Control Arrays in Visual Basic 6". www.freetutes.com. Retrieved 2018-02-12.
cite-note-33. ↑ "Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005". msdn.microsoft.com. 18 March 2014. Retrieved 2016-02-12.